package com.hy.usercenter.service;

import com.hy.usercenter.model.domain.SysUser;
import com.hy.usercenter.model.domain.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hy.usercenter.model.dto.TeamQuery;
import com.hy.usercenter.model.dto.TeamUpdateRequest;
import com.hy.usercenter.model.vo.TeamUserVo;

import java.util.List;

/**
* @author a
* @description 针对表【team(队伍表)】的数据库操作Service
* @createDate 2023-02-26 15:09:16
*/
public interface TeamService extends IService<Team> {


    /**
     * 创建队伍
     * @param team
     * @param currentUser
     * @return
     */
    Long addTeam(Team team, SysUser currentUser);

    /**
     * 根据队伍关键字查询队伍和用户信息
     *
     * @param teamQuery
     * @param isAdmin
     * @return
     */
    List<TeamUserVo> listTeamQuery(TeamQuery teamQuery, Boolean isAdmin);

    /**
     * 根据参数更新队伍信息
     * @param teamQuery
     * @return
     */
    boolean teamUpdate(TeamQuery teamQuery);

    /**
     * 用户信息修改
     * @param teamUpdateRequest
     * @param loginUser
     * @return
     */
    Boolean editTeamInfo(TeamUpdateRequest teamUpdateRequest, SysUser loginUser);
}
